import { Component, OnInit } from '@angular/core';
import { _HttpClient } from '@delon/theme';
import { Router } from '@angular/router';

@Component({
  selector: 'workplace-list',
  templateUrl: './workplace.component.html',
  styleUrls: ['./workplace.component.less']
})
export class WorkplaceListComponent implements OnInit {

  funcs = [
    { 
      id: '1',
      title: 'deliveryForOrder',
      logo: 'iconfont icon-danju',
      description: 'ship by order',
      updatedAt: new Date(),
      member: '',
      href: '/workplace/list/willsend',
      memberLink: '',
      enable: true
    },
    // { 
    //   id: '5',
    //   title: '按店发货',
    //   logo: 'iconfont icon-dianpu',
    //   description: '发货到指定客户',
    //   updatedAt: new Date(),
    //   member: '',
    //   href: '',
    //   memberLink: '',
    //   enable: false
    // },
    { 
      id: '2',
      title: 'deliveryRevoked',
      logo: 'iconfont icon-xiangzuojiaohuan',
      description: 'Be able to withdraw the sihpped history record occured within 1 week',
      updatedAt: new Date(),
      member: '',
      href: '/workplace/list/deliverycancel',
      memberLink: '',
      enable: true
    },
    // { 
    //   id: '3',
    //   title: '扫码退货',
    //   logo: 'iconfont icon-peizaizhuangche',
    //   description: '退货到上级客户',
    //   updatedAt: new Date(),
    //   member: '',
    //   href: '',
    //   memberLink: '',
    //   enable: false
    // },
    // { 
    //   id: '4',
    //   title: '退货撤销',
    //   logo: 'iconfont icon-xiangyoujiaohuan',
    //   description: '可以撤销7天内的退货',
    //   updatedAt: new Date(),
    //   member: '',
    //   href: '',
    //   memberLink: '',
    //   enable: false
    // },
    { 
      id: '7',
      title: 'logistic',
      logo: 'iconfont icon-yunshuzhongwuliu',
      description: 'Check the logistic shipment detail by QR code',
      updatedAt: new Date(),
      member: '',
      href: '/order/logistic',
      memberLink: '',
      enable: true
    }
  ]

  constructor(private router: Router) { }

  ngOnInit() { }

  goto(href) {
    this.router.navigate([href])
  }
}
